package com.controller.api;

import com.biz.ActPhotoUrlBiz;
import com.biz.SharePhotoBiz;
import com.controller.backend.BaseController;
import com.core.Result;
import com.core.ResultGenerator;
import com.entity.model.ActPhotoUrl;
import com.entity.model.News;
import com.entity.model.SharePhoto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tk.mybatis.mapper.entity.Condition;

import java.util.List;

/**
* Created by jc on 2019/11/16.
*/
@RestController("apiSharePhotoController")
@RequestMapping("/api/sharePhoto")
public class sharePhotoController extends BaseController<SharePhoto>{
    @Autowired
    private SharePhotoBiz sharePhotoBiz;


    @RequestMapping(value = "/sharePhotoList")
    public Result list() {
        Condition condition=new Condition(News.class);
        condition.createCriteria().andEqualTo("status",0);
        List<SharePhoto> sharePhotos = sharePhotoBiz.findByCondition(condition);
        return ResultGenerator.genSuccessResult(sharePhotos);
    }

}
